import Vue from 'vue'
import 'normalize.css'
import '@/assets/styles/element/element-variables.scss'
import '@/assets/styles/index.scss'
import "@/core/utils/extand/string-extand";
import App from '@/App.vue'
import store from '@/core/store'
import i18n from '@/assets/language'
import '@/assets/icons/components'
import '@/core/router/router-defend'
import '@/core/config/import-element-ui'
import '@/core/config/import-mint-ui'

import * as filters from '@/core/filters'
import router from "@/core/router/router";
import {initializer} from "@/core/config/initializer";

//注册全局过滤器
Object.keys(filters).forEach(key => {
    Vue.filter(key, (filters as { [key: string]: Function })[key])
});

//异常信息处理
// Vue.config.errorHandler = function (err, vm, info) {
//////////console.log(`异常信息: ${err.toString()}`);
//////////console.log(`info: ${info}`);
//////////console.log(vm);
// };

//警告信息处理
Vue.config.warnHandler = function (msg, vm, trace) {
    // if (process.env.NODE_ENV == "dev") {
    // //////////console.log(`开发环境-友情提示信息: ${msg}\nTrace: ${trace}`);
    // }
};

Vue.config.productionTip = false;
new Vue({
    router,
    store,
    i18n,
    created: initializer,
    render: (h) => h(App)
}).$mount('#app');
